<?php

namespace app\api\validate;

use think\Validate;
use app\common\Error;

class Video extends Validate
{
    protected $rule = [
        'video_detail_id'  =>  'require',
        'name' => 'require',
        'video_id' => 'require',
        'app_id' => 'require',
    ];

    protected $message  =   [
        'video_detail_id.require'    => Error::VIDEO_DETAIL_ID_NOT_EXIXTS,
        'name.require' => Error::SEARCH_TERM_DOES_NOT_EXIST,
        'video_id.require' => Error::VIDEO_ID_NOT_EXIXTS,
        'app_id.require' => Error::APP_ID_NOT_EXIXTS,
    ];

    protected $scene = [
        'get_like'  =>  ['video_detail_id'],
        'watch_video_pay' => ['video_detail_id'],
        'share' => ['video_detail_id'],
        'get_search_video' => ['name'],
        'add_subscribe' => ['video_id'],
        'info' => ['video_id'],
        'list' => ['video_id'],
        'ios_pay' => ['app_id'],
        'share' => ['video_detail_id'],
        'applet_config' => ['app_id'],
        'other_video' => ['video_id'],
        'activity_pay' => ['app_id']
    ];
}